package gitee

import "time"

type ErrorMsg struct {
	Message string `json:"message"`
}

type DeployKey struct {
	ID        int64     `json:"id"`
	Key       string    `json:"key"`
	URL       string    `json:"url"`
	Title     string    `json:"title"`
	CreatedAt time.Time `json:"created_at"`
}

type WebHook struct {
	ID                  int64     `json:"id"`
	URL                 string    `json:"url"`
	CreatedAt           time.Time `json:"created_at"`
	Password            string    `json:"password"`
	ProjectID           int64     `json:"project_id"`
	Result              string    `json:"result"`
	ResultCode          int64     `json:"result_code"`
	PushEvents          bool      `json:"push_events"`
	TagPushEvents       bool      `json:"tag_push_events"`
	IssuesEvents        bool      `json:"issues_events"`
	NoteEvents          bool      `json:"note_events"`
	MergeRequestsEvents bool      `json:"merge_requests_events"`
}

type PushRule struct {
	RestrictPushOwnCommit     bool   `json:"restrict_push_own_commit"`
	RestrictAuthorEmailSuffix bool   `json:"restrict_author_email_suffix"`
	AuthorEmailSuffix         string `json:"author_email_suffix"`
	RestrictCommitMessage     bool   `json:"restrict_commit_message"`
	CommitMessageRegex        string `json:"commit_message_regex"`
	RestrictFileSize          bool   `json:"restrict_file_size"`
	MaxFileSize               int64  `json:"max_file_size"`
	ExceptManager             bool   `json:"except_manager"`
}
